package action.newelifile;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.widget.TextView;

public class NewEliFileActivity extends Activity {
	PackageInfo info;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.welcome);
		init();
		super.onCreate(savedInstanceState);
	}
	
	
	private void init(){
		try {
			info = getPackageManager().getPackageInfo(getPackageName(), 0);
			((TextView)findViewById(R.id.version)).setText("Version "+info.versionName);	
			thread.start();
		} catch (NameNotFoundException e) {
			e.printStackTrace();
		}
	}
	
	private void gotoLocal(){
		Intent intent = new Intent(this,LocalActivity.class);
		startActivity(intent);
		finish();
	}
	

	Thread thread = new Thread(){
		public void run() {
			try {
				sleep(2000);
			} catch (Exception e) {
				e.printStackTrace();
			} finally{
				gotoLocal();
			}
		}
	};
}